package Testking14;

public class DragDropThread {


	public static void main(String[] args) {

		Runnable r = new Runnable() {
			public void run() {
				try {
					//System.out.println(Thread.currentThread().getName());
					Thread.sleep(500);
				} catch (InterruptedException e) {
					System.out.println("Interrupted");
				}
				System.out.println("ran");
			}
		};

		Thread t = new Thread(r,"Thread 1");
		t.start();
		System.out.println("started");
		try {
			//System.out.println(t.getName());
			t.sleep(2000);
		} catch (InterruptedException e) {
		}
		System.out.println("Interrupteding");
		t.interrupt();
		System.out.println("ended");

	}

}
